package com.twopai.framelibrary.http;

import com.twopai.framelibrary.entity.KDItemEntity;
import com.twopai.framelibrary.entity.RunShopDetailEntity;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Streaming;
import retrofit2.http.Url;

/**
 * author : twopai
 * description :
 */
public interface ApiManager {
    /**
     * 下载文件
     */
    @Streaming
    @GET
    Observable<ResponseBody> download(@Url String url);//直接使用网址下载

    //获取开店列表
    //app.99djc.com/api/newsList
    @POST("newsList")
    Observable<BaseObjectBean<KDItemEntity>> newsList(@Body RequestBody requestBody);

    //获取开店列表详情
    //app.99djc.com/api/newsInfo
    @POST("newsInfo")
    Observable<BaseObjectBean<RunShopDetailEntity>> newsInfo(@Body RequestBody requestBody);

}
